
package com.hiwan.system.web.demo;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hiwan.system.common.base.BaseController;
import com.hiwan.system.pojo.FileInfo;
import com.hiwan.system.service.file.FileInfoService;

@Controller
@RequestMapping("/demo")
public class DemoController extends BaseController{

	@Autowired
	private FileInfoService fileInfoService;
	
	
	/**
	 * 文件上传页面
	 * @return
	 */
	@RequestMapping("fileUpload")
	public String fileUpload(ModelMap model){
		return "demo/fileUpload";
	}
	/**
	 * @param model
	 * @return
	 */
	@RequestMapping("/uploadPage")
	public String uploadPage(ModelMap model){
		return "demo/uploadPage";
	}
	/**
	 * @param model
	 * @return
	 */
	@RequestMapping("/imageUpload")
	public String imageUpload(ModelMap model){
		return "demo/imageUpload";
	}
	/**
	 * @图片显示
	 * @return
	 */
	@RequestMapping("/imageShow")
	public String imageShow(ModelMap model,HttpSession session){
		List<FileInfo> pics = fileInfoService.selectFilesInfoList("picture");
		model.put("pics",pics);
		return "demo/imageShow";
	}
}
